/**
 * @Date: 2022-04-16 10:44:02
 * @LastEditors: sailornpg
 * @LastEditTime: 2022-04-20 14:45:57
 * @FilePath: \weibo-api\model\Reply.js
 * @Description: 回复表模型
 */
const sequelize = require("../db/seq");
const { DataTypes } = require("sequelize");
//创建模型 表名字为'blog'
const Reply = sequelize.define("reply", {
  blogId: {
    type: DataTypes.INTEGER,
    // allowNull: false,
    comment: "所在的博客id",
  },
  commentId: {
    type: DataTypes.INTEGER,
    // allowNull: false,
    comment: "回复评论id",
  },
  parantId: {
    type: DataTypes.INTEGER,
    // allowNull: false,
    comment: "回复评论的回复id",
  },
  userId: {
    type: DataTypes.INTEGER,
    allowNull: false,
    comment: "回复评论的用户id",
  },
  reply_userId: {
    type: DataTypes.INTEGER,
    allowNull: false,
    comment: "被回复评论的用户id",
  },
  content: {
    type: DataTypes.TEXT,
    allowNull: false,
    comment: "回复评论内容",
  },
});
module.exports = Reply;
